// SINGULARITY HTML5 GAME ENGINE
// -----------------------------
// Copyright(c) 2013 by Codenova.pl

define(['../Core'], function (Core) {
    var Circle = function(objCircle) {
        this.Background = objCircle.Background;
        this.Id = Core.GenerateUUID();
        this.Opacity = objCircle.Opacity;
        this.Radius = objCircle.Radius;
        this.X = objCircle.X;
        this.Y = objCircle.Y;
    };

    Circle.prototype = {
        Add: function(ctx) {
            ctx.beginPath();
            ctx.arc(this.X, this.Y, this.Radius, 0, 2 * Math.PI, false);
            ctx.fillStyle = 'rgba(' + this.Background + ', ' + this.Opacity + ')';
            ctx.fill();
            ctx.closePath();
        },

        Create: function(objCircle) {
            "use strict";
            return new Circle(objCircle);
        }
    };

    return Circle.prototype.Create;
});